/**
 * 
 */
package jp.seraph.cui;

/**
 *
 */
public class PwdCommand extends AbstractCommand implements Command {
    public PwdCommand(Mode aParent, InternalConsole aConsole){
        super(aParent, aConsole);
    }

    /**
     *
     * @see jp.seraph.cui.AbstractCommand#executeImpl(jp.seraph.cui.SystemNode[], int)
     */
    @Override
    protected void executeImpl(SystemNode[] args, int argListIndex) {
        InternalConsole tConsole = this.getConsole();
        ConsoleContext tContaxt = tConsole.getContext();
        Mode tMode = tContaxt.getMode();
        
        tConsole.output(CuiSystemUtil.getFullPath(tMode, CuiSystemUtil.getPathSeparator()));
    }

    /**
     *
     * @see jp.seraph.cui.Command#getArgumentTypes()
     */
    public SystemNodeType[][] getArgumentTypes() {
        return new SystemNodeType[][]{
                    new SystemNodeType[0]
            };
    }

    /**
     *
     * @see jp.seraph.cui.Command#getHelp()
     */
    public String getHelp() {
        return "現在のモードを表示します";
    }

    /**
     *
     * @see jp.seraph.cui.SystemNode#getName()
     */
    public String getName() {
        return "pwd";
    }

    /**
     *
     * @see jp.seraph.cui.SystemNode#getType()
     */
    public SystemNodeType getType() {
        return PwdCommandType.getInstance();
    }

    /**
     *
     * @see jp.seraph.cui.SystemNode#isRoot()
     */
    public boolean isRoot() {
        return false;
    }

}
